From de83783266dafe6a8798eec92870fc2199dbad7e Mon Sep 17 00:00:00 2001 From: robertl Date: Fri, 29 Aug 2003 21:59:34 +0000 Subject: [PATCH] Add a shortname test. --- gpsbabel/testo | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/gpsbabel/testo b/gpsbabel/testo index 9a8291cba..3bef60b53 100755 --- a/gpsbabel/testo +++ b/gpsbabel/testo @@ -346,3 +346,22 @@ ${PNAME} -i xmap -f reference/arcdist_input.txt \ -o xmap -F ${TMPDIR}/polygon.txt compare ${TMPDIR}/polygon.txt reference/polygon_output.txt + + + +# +# This is nasty. If we have a dictionary handy, treat it as a list of +# waypoints and reduce all the names to eight characters. Fewer chars +# results in lost waypoints currently and that's a defect. +# +DICT=/usr/share/dict/words +if [ -f $DICT ]; +then + WORDS=`cat $DICT | wc -l` + SWORDS=`${PNAME} -i gpsdrive -f $DICT -o gpsdrive,snlen=8 -F /dev/fd/1 | wc -l` + if [ $WORDS -ne $SWORDS ]; + then + echo "Shortname reduction failed." + exit 1 + fi +fi -- 2.30.2